﻿using UnityEngine;

namespace UFrame
{
    public class RayParentDelivery : MonoBehaviour
    {
        [Header("参数")] 
        public string args;

        [HideInInspector]
        public RaycastHit hit3D;
        [HideInInspector]
        public RaycastHit2D hit2D;
        
        public void Execute()
        {
            var ray = transform.GetComponentInParent<IRayCollision>();
            if (ray != null)
            {
                ray.OnRayCollision(this);
            }
        }
    }
}